﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using BSCMFF.Core;

namespace BSCMFF.Web.Pages.Settings
{
    public partial class Themes : MultiLanguagePage
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                HttpCookie cookie = Request.Cookies["Theme"];
                if (cookie != null)
                {
                    RadComboBoxTheme.SelectedValue = cookie.Value;
                }
                else
                {
                    RadComboBoxTheme.SelectedValue = "Windows7";
                }
            }
        }

        protected void RadComboBoxTheme_Changed(object sender, EventArgs e)
        {
            //HttpCookie cookie = Request.Cookies["Theme"];
            //if (cookie != null)
            //{
                HttpCookie cookie = new HttpCookie("Theme");
                cookie.Value = RadComboBoxTheme.SelectedValue;
                Response.Cookies.Add(cookie);

                Response.Redirect(Request.Url.AbsolutePath);
                //RadSkinManager1.Skin = cookie.Value;
            //}
            //else
            //{

            //}
        }
        
    }
}